package com.huowenjie.controller;

import com.huowenjie.entity.Goods;
import com.huowenjie.entity.GoodsExample;
import com.huowenjie.mapper.GoodsMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class GoodsController {

    @Autowired
    GoodsMapper goodsMapper;

    @RequestMapping("goodsList")
    public List<Goods> goodsList(){
        GoodsExample goodsExample = new GoodsExample();
        List<Goods> goodsList = goodsMapper.selectByExample(goodsExample);
        return goodsList;
    }

}
